home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earkit
/
news
/
thor
/
rexx
/
fse
/
asciipic.fse
next >
Wrap
Text File
|
1998-05-24
|
1KB
|
48 lines
/* ASCIIPic.fse by Troels Walsted Hansen
** $VER: ASCIIPic.fse 1.02 (3.12.94)
**
** Convert picture to ASCII and include it in the FSE. Uses
** 'ilbm2ascii' v1.4 by Tobias Ferber.
*/
defpath = 'work:pictures/' /* Edit to suit your environment */
options results
/* needs THOR and FSE functions */
if(substr(address(),1,8) ~= "THOR_FSE") then
do
say "This script should only be started from inside the FSE."
exit 20
end
else fseport = address()
p = ' ' || address() || ' ' || show('P',,)
thorport = pos(' THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport+1),1)
else
do
say 'No THOR port found!'
exit 10
end
address(thorport)
REQUESTFILE TITLE '"Select ILBM to convert and include:"' ID '"'defpath'"' FP PAT '"#?"'
if(rc ~= 0) then exit
else picfile = result
lastchar = right(picfile,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|picfile = "") then exit
address command "ilbm2ascii "||'"'picfile'"'||" > t:FSEASCIIPicture"
address(fseport)
INCLUDEFILE 't:FSEASCIIPicture'
address command "delete >nil: t:FSEASCIIPicture"
exit